-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Smarter helper rules #682
base: main
Are you sure you want to change the base?
Smarter helper rules #682
Conversation
:ruleset type-helpers) | ||
|
||
(function TypeList-length (TypeList) i64 :unextractable) | ||
(function TypeList-ith (TypeList i64) BaseType :unextractable) | ||
(function TypeList-suffix (TypeList i64) TypeList :unextractable) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old TypeList-suffix based implementation is quadratic in the size of the list (which easily goes to 20+)
(rule ((Get expr i)) | ||
((union (Single (Get expr i)) | ||
(SubTuple expr i 1))) | ||
; ;; This rule makes sure every tuple can be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is actually unnecessary because we are already generating gets for every "important" tuple. Removed in my new PRs.
Eggcc has been constantly blowing up with the giant analyses our helpers generate. But do our helpers really need to generate that many facts? We explore the question in this PR.
Get
andTypeList-ith
are quadratic